'''
    Cutoff percentage used for normalizing the hic matrices
'''
CUTOFF_PERCENTILE = 99.95


'''
    Pre-Computed cutoff values for datasets
'''
my_regions=['chr1:23332887-24859837',
 'chr1:216834799-218369449',
 'chr1:53161034-54751534',
 'chr1:16416481-18074081',
 'chr1:2107490-3647640',
 'chr1:105712018-107439918',
 'chr1:139319003-140937703',
 'chr1:120405190-122105290',
 'chr1:211604656-213344206',
 'chr1:191772000-193550200',
 'chr2:58318555-59991805',
 'chr2:22458182-24109032',
 'chr2:59092807-60699657',
 'chr2:157095942-158664142',
 'chr2:115755013-117333613',
 'chr2:96239583-97786683',
 'chr2:17141737-18929237',
 'chr2:7413906-9129256',
 'chr2:121228617-123005867',
 'chr2:54140189-55688889',
 'chr3:133435903-135098903',
 'chr3:68848239-70433089',
 'chr3:172066396-173583596',
 'chr3:57953703-59709053',
 'chr3:39286736-40829586',
 'chr3:53142179-54829929',
 'chr3:101477183-103125283',
 'chr3:146670788-148232738',
 'chr3:28117616-29861816',
 'chr3:130970037-132530787',
 'chr4:151371860-153038110',
 'chr4:171359409-173137859',
 'chr4:113612322-115325772',
 'chr4:132984515-134762715',
 'chr4:86559781-88263931',
 'chr4:133854425-135614525',
 'chr4:179870049-181452749',
 'chr4:145709201-147458951',
 'chr4:58726458-60230408',
 'chr4:91327195-93116195',
 'chr5:85432118-87063918',
 'chr5:9520939-11235989',
 'chr5:39826932-41432132',
 'chr5:161755640-163319490',
 'chr5:101738409-103477159',
 'chr5:79022660-80816760',
 'chr5:126280463-127807613',
 'chr5:22721219-24432769',
 'chr5:60422313-61975763',
 'chr5:10907077-12530127',
 'chr6:4103073-5786773',
 'chr6:88743249-90309049',
 'chr6:39948428-41717128',
 'chr6:123677635-125329685',
 'chr6:135559824-137216374',
 'chr6:142219161-143924911',
 'chr6:9024267-10759317',
 'chr6:24332839-26110739',
 'chr6:139049125-140794925',
 'chr6:20497223-22171823',
 'chr7:55325845-56944445',
 'chr7:143724720-145469870',
 'chr7:112163246-113860746',
 'chr7:104305668-106054468',
 'chr7:62698764-64207114',
 'chr7:64612-1639112',
 'chr7:81186169-82893769',
 'chr7:153079785-154683985',
 'chr7:89304669-90831519',
 'chr7:132475588-134082888', 
 'chr8:81283565-82950665',
 'chr8:103122092-104779242',
 'chr8:16712460-18279510',
 'chr8:34177422-35775272',
 'chr8:77064690-78863440',
 'chr8:89664060-91186760',
 'chr8:9645916-11343066',
 'chr8:112170063-113727763',
 'chr8:132024868-133771418',
 'chr8:21909605-23685455',
 'chr9:40634087-42278537',
 'chr9:110364607-111879007',
 'chr9:125165805-126824155',
 'chr9:123180290-124699540',
 'chr9:27240967-28933817',
 'chr9:40632473-42140723',
 'chr9:8714882-10459932',
 'chr9:35621910-37379910',
 'chr9:86949293-88492393',
 'chr9:93057978-94637828',
 'chr10:51460966-53161766',
 'chr10:14897755-16422355',
 'chr10:81888886-83675936',
 'chr10:62704968-64456568',
 'chr10:84867566-86505916',
 'chr10:87304899-88855799',
 'chr10:130122131-131901681',
 'chr10:95780038-97534788',
 'chr10:39780308-41332358',
 'chr10:128643542-130302292',
 'chr11:107285762-108906062',
 'chr11:123062545-124841445',
 'chr11:131989456-133539206',
 'chr11:69659982-71237432',
 'chr11:5125025-6785575',
 'chr11:59670465-61322615',
 'chr11:101551311-103129311',
 'chr11:61132181-62778181',
 'chr11:105972779-107731629',
 'chr11:10111908-11630158',
 'chr12:121054663-122571013',
 'chr12:65251976-66856576',
 'chr12:120939757-122450657',
 'chr12:126806662-128519662',
 'chr12:89457613-91190763',
 'chr12:76745271-78333721',
 'chr12:30823805-32362055',
 'chr12:104198946-105955896',
 'chr12:104608722-106314472',
 'chr12:93751410-95465910',
 'chr13:56386360-58094060',
 'chr13:40978228-42524678',
 'chr13:19554238-21228688',
 'chr13:75968976-77641826',
 'chr13:11278592-12821492',
 'chr13:55786418-57312168',
 'chr13:13315874-14985924',
 'chr13:103860193-105424143',
 'chr13:98553305-100065855',
 'chr13:106212240-107895190',
 'chr14:57859426-59640576',
 'chr14:55971412-57483712',
 'chr14:66655849-68288749',
 'chr14:96978050-98581500',
 'chr14:10541265-12185615',
 'chr14:9439462-10989162',
 'chr14:48218164-50001514',
 'chr14:3942983-5584433',
 'chr14:46691359-48264209',
 'chr14:1337378-2931778',
 'chr15:49097178-50626028',
 'chr15:80072825-81631475',
 'chr15:27914341-29415641',
 'chr15:27486556-29256456',
 'chr15:90430422-92230272',
 'chr15:16534030-18036930',
 'chr15:39361088-41012238',
 'chr15:92538625-94048675',
 'chr15:81181357-82776707',
 'chr15:19043810-20620360',
 'chr16:60941301-62487301',
 'chr16:63980774-65621824',
 'chr16:34657547-36210847',
 'chr16:3749539-5334739',
 'chr16:48619013-50256213',
 'chr16:63534700-65154550',
 'chr16:39774973-41501523',
 'chr16:85351162-86985062',
 'chr16:24702176-26445076',
 'chr16:10846003-12388003',
 'chr17:71568635-73306535',
 'chr17:41307184-42871234',
 'chr17:50544911-52105061',
 'chr17:16808891-18400141',
 'chr17:42398229-44106429',
 'chr17:32593258-34190158',
 'chr17:24688603-26307803',
 'chr17:49990994-51662894',
 'chr17:6208332-7762482',
 'chr17:2758124-4419424',
 'chr18:10458396-12245996',
 'chr18:9826235-11380285',
 'chr18:56402545-58025145',
 'chr18:73924062-75594762',
 'chr18:19096965-20839065',
 'chr18:56665215-58287265',
 'chr18:47588791-49123391',
 'chr18:33293849-34975999',
 'chr18:49560707-51321607',
 'chr18:71029002-72552652',
 'chr19:25261908-26929258',
 'chr19:565568-2236418',
 'chr19:48867367-50498667',
 'chr19:29614967-31198517',
 'chr19:24937425-26557525',
 'chr19:31600729-33137979',
 'chr19:12445890-13990340',
 'chr19:18587159-20133059',
 'chr19:37458933-39206933',
 'chr19:46184341-47747341',
 'chr20:100000-2100000',
 'chr20:53395648-55183398',
 'chr20:29941585-31604885',
 'chr20:12440688-14113388',
 'chr20:28972004-30543554',
 'chr20:16640158-18325858',
 'chr20:22843046-24557396',
 'chr20:9567543-11213093',
 'chr20:31033512-32792162',
 'chr20:42768716-44304116',
 'chr20:32432908-34016308',
 'chr21:19778884-21279634',
 'chr21:30137811-31891211',
 'chr21:31005024-32508174',
 'chr21:14679003-16301253',
 'chr21:7681095-9438695',
 'chr21:20210437-21933737',
 'chr21:40880072-42444022',
 'chr21:28468189-30257439',
 'chr21:31637463-33175363',
 'chr21:45511806-47215606',
 'chr22:15593599-17316299',
 'chr22:27199566-28814266',
 'chr22:42417205-43926055',
 'chr22:8108873-9719473',
 'chr22:44861516-46378116',
 'chr22:16993-1622043',
 'chr22:26738092-28453542',
 'chr22:39031602-40822402',
 'chr22:26590880-28272980',
 'chr22:6847234-8450684']

chromosome_lengths_hg19 = {
    'chr1': 249250621,
    'chr2': 243199373,
    'chr3': 198022430,
    'chr4': 191154276,
    'chr5': 180915260,
    'chr6': 171115067,
    'chr7': 159138663,
    'chr8': 146364022,
    'chr9': 141213431,
    'chr10': 135534747,
    'chr11': 135006516,
    'chr12': 133851895,
    'chr13': 115169878,
    'chr14': 107349540,
    'chr15': 102531392,
    'chr16': 90354753,
    'chr17': 81195210,
    'chr18': 78077248,
    'chr19': 59128983,
    'chr20': 63025520,
    'chr21': 48129895,
    'chr22': 51304566
}

dataset_cutoff_values = {
    'GM12878_rao_et_al': 255,
    'GM12878_rao_et_al_replicate': 255,
    'IMR90_rao_et_al': 255,
    'K562_rao_et_al': 255,
    'downsampled_8': 140,
    'downsampled_16': 100,
    'downsampled_25': 80,
    'downsampled_50': 50,
    'downsampled_100': 25,
}
main_dir = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/"
hic_file = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/data/hic_datasets/GM12878/GM12878-HRC.hic"
hic_K562 = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/data/hic_datasets/K562/K562-HRC.hic"
hic_IMR90 = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/data/hic_datasets/IMR90/IMR90-HRC.hic"
chromosome = 20
hic_res = 10000
start = 100000
end = 2100000
size = int(end - start)
sizes="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/expData_scripts/hg19_resources/hg19.chrom.sizes"
all="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/plots/"
all_nc="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/plots/"
input_matrices="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/input_matrices/"
input_matrices_nc="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/input_matrices/"
restrictions_path="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/restrictions/"
restrictions_path_nc="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/restrictions/"

'''Submatrices'''
submat_main = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/submatrices/"
submat_main_nc = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/submatrices/"
sub_reconstruction = "/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/submatrices/restrictions/"
coords =  ["0:180","130:310","220:400"]
reconstructed_matrix="/gpfs/commons/home/cangel/g2lab/projects/01_12_23_highResolutionHiC/scripts/ParameterTuning/results/clamp/restrictions/"
